﻿@using Orchard.ContentManagement
@if (Model.LatestComments.Count > 0) {
    <h1>@T("Recent comments")</h1>    
    <ul id="commentsWidget">
        @foreach (Orchard.Comments.Models.CommentPart comment in Model.LatestComments) {
            <li>
                <span >@Display.CommentAuthor(ContentPart: comment)</span>
                <span>commented on @Html.ItemDisplayLink(WorkContext.Resolve<IContentManager>().Get(comment.Record.CommentedOn))</span>
                <span >@Display.DateTimeRelative(dateTimeUtc: comment.Record.CommentDateUtc.GetValueOrDefault())</span>
                <br />
                <strong class="text">"@(new MvcHtmlString(Html.Encode(comment.Record.CommentText)))"</strong>
            </li>
        }
    </ul>
}
